<template>
    <div class="common-layout">
        <el-container>
            <el-aside width="200px">
                <div class="title">arcbbs管理后台</div>
                <div class="menulist">
                    <el-menu :default-active="$route.path"  style="height: 100%;" router class="menu el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
                        <el-sub-menu index="1">
                            <template #title>
                                <el-icon>
                                    <location />
                                </el-icon>
                                <span>内容管理</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="/tiezi">帖子管理</el-menu-item>
                                <el-menu-item index="/plgl">评论管理</el-menu-item>
                                <el-menu-item index="/bkgl">板块管理</el-menu-item>
                            </el-menu-item-group>
                        
                        </el-sub-menu>
                        <el-sub-menu index="2">
                            <template #title>
                                <el-icon>
                                    <location />
                                </el-icon>
                                <span>用户管理</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="/yhgl">用户管理</el-menu-item>
                            </el-menu-item-group>
                        
                        </el-sub-menu>
                    
                    </el-menu>
                </div>
            </el-aside>
            <el-container>
                <el-header style="background: #fff;"></el-header>
                <el-main style="background: #e5e5e5;"><router-view></router-view></el-main>
            </el-container>
        </el-container>
    </div>
</template>
<script setup>
import { useRouter } from "vue-router";

const router=useRouter();

</script>
<style scoped>
.title {
    width: 100%;
    height: 60px;
    background: #000;
    color: #fff;
    line-height: 60px;
    text-align: center;
}

.menulist {
    width: 100%;
    height: calc(100% - 60px);
    background: #fff;
}
</style>
<style>
.common-layout {
    height: 100%;
}

.el-container {
    height: 100%;
}
.menu .el-sub-menu__title{
    color: #fff !important;
}

.menu .el-submenu__title {
  color: #fff !important;
}

.menu .el-menu-item {
  color: #fff !important;
}

.menu .is-active {
  background: #2bb7e5 !important;
}

.menu .el-submenu__title:hover {
  background: #2bb7e5 !important;
}

.menu .el-menu-item:hover {
  background: #2bb7e5 !important;
}

.menu {
  width: 100%;
  height: 100%;
  background: #2c334c !important;
}

.menu .el-menu {
  width: 100%;
  height: 100%;
  background: #2c334c !important;
}

</style>